import QtQuick
import Qt5Compat.GraphicalEffects

import Fk

Item {
  property alias title: titleItem
  signal accepted() //Read result
  signal finished() //Close the box

  id: root

  BorderImage {
    id: img
    source: Cpp.path + "/packages/lunarltk-qsgs-ui/image/selfArea/choiceBox/choice-bg.png"
    border.left: 22
    border.right: 22
    border.top: 22
    border.bottom: 22
    anchors.fill: root
  }

  Glow {
    id: rowGlow
    source: titleItem
    anchors.fill: titleItem
    color: '#81451c'
    spread: 0.9
    radius: 1.2
  }

  Text {
    id: titleItem
    color: "#E4D5A0"
    font.pixelSize: 18
    font.family: Config.li2Name
    horizontalAlignment: Text.AlignHCenter
    anchors.top: parent.top
    anchors.topMargin: 6
    anchors.horizontalCenter: parent.horizontalCenter
    height: contentHeight + 5
  }

  DragHandler {
    grabPermissions: PointHandler.TakeOverForbidden
    xAxis.enabled: true
    yAxis.enabled: true
  }

  function close()
  {
    accepted();
    finished();
  }
}